package com.example.yls.demoa;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.view.Gravity;
import android.widget.Toast;

public class MyBroadcastReceiver extends BroadcastReceiver {

    public MyBroadcastReceiver(){

    }
    @Override
    public void onReceive(Context context, Intent intent) {

        Toast t = Toast.makeText(context,"静态广播："+
                intent.getStringExtra("info"),Toast.LENGTH_SHORT);
        t.setGravity(Gravity.TOP,0,0);
        t.show();

//        throw new UnsupportedOperationException("Not yet implemented");

    }
}
